package com.butang.mapper;

import com.butang.pojo.Emp;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * ClassName: EmpMapper
 * Package: com.butang.mapper
 * Description:
 *
 * @Author BuTang
 * @Create 2023/7/9 22:48
 * @Version 1.0
 */
@Mapper
public interface EmpMapper {

//@Select("select * from  emp ")
//    List<Emp> list();
//@Select("select * from  emp limit #{start} , #{pageSize}")
    List<Emp> list(Integer start, Integer pageSize, String name, Short gender, LocalDateTime begin, LocalDateTime
            end);

    @Select("select count(*) from emp")
    int count();

    void empDelete(List<Integer> ids);

    Emp login(Emp emp);

    void add(Emp emp);

    Emp getEmp(Integer id);

    void update(Emp emp);

    @Delete("delete from management.emp where job = #{id}")
    void delete(Integer id);


    // List<Emp> list();
}
